@import "tailwindcss";
@import "tw-animate-css";

@plugin "@kobalte/tailwindcss";
@plugin "@tailwindcss/typography";

@custom-variant dark (&:where(.dark, .dark *, [data-kb-theme=dark], [data-kb-theme=dark] *));

:root {
  --background: hsl(0 0% 100%);
  --foreground: hsl(240 10% 3.9%);

  --muted: hsl(240 4.8% 95.9%);
  --muted-foreground: hsl(240 3.8% 46.1%);

  --popover: hsl(0 0% 100%);
  --popover-foreground: hsl(240 10% 3.9%);

  --border: hsl(240 5.9% 90%);
  --input: hsl(240 5.9% 90%);

  --card: hsl(0 0% 100%);
  --card-foreground: hsl(240 10% 3.9%);

  --primary: hsl(199 100% 33%);
  --primary-foreground: hsl(0 0% 98%);

  --secondary: hsl(240 4.8% 95.9%);
  --secondary-foreground: hsl(240 5.9% 10%);

  --accent: hsl(240 4.8% 95.9%);
  --accent-foreground: hsl(240 5.9% 10%);

  --destructive: hsl(0 84.2% 60.2%);
  --destructive-foreground: hsl(0 0% 98%);

  --info: hsl(204 94% 94%);
  --info-foreground: hsl(199 89% 48%);
  --success: hsl(149 80% 90%);
  --success-foreground: hsl(160 84% 39%);
  --warning: hsl(48 96% 89%);
  --warning-foreground: hsl(25 95% 53%);
  --error: hsl(0 93% 94%);
  --error-foreground: hsl(0 84% 60%);

  --ring: hsl(240 5.9% 10%);

  --sidebar: hsl(0 0% 98%);
  --sidebar-foreground: hsl(240 5.3% 26.1%);
  --sidebar-primary: hsl(240 5.9% 10%);
  --sidebar-primary-foreground: hsl(0 0% 98%);
  --sidebar-accent: hsl(240 4.8% 95.9%);
  --sidebar-accent-foreground: hsl(240 5.9% 10%);
  --sidebar-border: hsl(220 13% 91%);
  --sidebar-ring: hsl(217.2 91.2% 59.8%);
}

.dark,
[data-kb-theme="dark"] {
  --background: hsl(240 10% 3.9%);
  --foreground: hsl(0 0% 98%);

  --muted: hsl(240 3.7% 15.9%);
  --muted-foreground: hsl(240 5% 64.9%);

  --accent: hsl(240 3.7% 15.9%);
  --accent-foreground: hsl(0 0% 98%);

  --popover: hsl(240 10% 3.9%);
  --popover-foreground: hsl(0 0% 98%);

  --border: hsl(240 3.7% 15.9%);
  --input: hsl(240 3.7% 15.9%);

  --card: hsl(240 10% 3.9%);
  --card-foreground: hsl(0 0% 98%);

  --primary: hsl(0 0% 98%);
  --primary-foreground: hsl(240 5.9% 10%);

  --secondary: hsl(240 3.7% 15.9%);
  --secondary-foreground: hsl(0 0% 98%);

  --destructive: hsl(0 62.8% 30.6%);
  --destructive-foreground: hsl(0 0% 98%);

  --info: hsl(204 94% 94%);
  --info-foreground: hsl(199 89% 48%);
  --success: hsl(149 80% 90%);
  --success-foreground: hsl(160 84% 39%);
  --warning: hsl(48 96% 89%);
  --warning-foreground: hsl(25 95% 53%);
  --error: hsl(0 93% 94%);
  --error-foreground: hsl(0 84% 60%);

  --ring: hsl(240 4.9% 83.9%);

  --sidebar: hsl(240 5.9% 10%);
  --sidebar-foreground: hsl(240 4.8% 95.9%);
  --sidebar-primary: hsl(224.3 76.3% 48%);
  --sidebar-primary-foreground: hsl(0 0% 100%);
  --sidebar-accent: hsl(240 3.7% 15.9%);
  --sidebar-accent-foreground: hsl(240 4.8% 95.9%);
  --sidebar-border: hsl(240 3.7% 15.9%);
  --sidebar-ring: hsl(217.2 91.2% 59.8%);
}

@theme {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);

  --color-info: var(--info);
  --color-info-foreground: var(--info-foreground);
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);
  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);
  --color-error: var(--error);
  --color-error-foreground: var(--error-foreground);

  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);

  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);

  @keyframes accordion-down {
    from {
      height: 0;
    }

    to {
      height: var(--kb-accordion-content-height);
    }
  }

  @keyframes accordion-up {
    from {
      height: var(--kb-accordion-content-height);
    }

    to {
      height: 0;
    }
  }

  @keyframes content-show {
    from {
      opacity: 0;
      transform: scale(0.96);
    }

    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes content-hide {
    from {
      opacity: 1;
      transform: scale(1);
    }

    to {
      opacity: 0;
      transform: scale(0.96);
    }
  }
}

@utility container {
  @apply px-8;

  @media (width >=--theme(--breakpoint-sm)) {
    @apply max-w-none;
  }

  @media (max-width: 640px) {
    @apply px-4;
  }
}

@utility step {
  counter-increment: step;

  &:before {
    @apply bg-muted border-background absolute inline-flex h-9 w-9 items-center justify-center rounded-full border-4 text-center -indent-px font-mono text-base font-medium;
    @apply mt-[-4px] ml-[-50px];
    content: counter(step);
  }
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
  }

  /**
   * Scrollbar
   */

  ::-webkit-scrollbar {
    width: 16px;
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 9999px;
    border: 4px solid transparent;
    background-clip: content-box;
    @apply bg-accent;
  }

  ::-webkit-scrollbar-corner {
    display: none;
  }
}

/* Customization below. Above from https://github.com/stefan-karger/solid-ui/issues/166#issuecomment-2819024081 */

@theme {
  /* Generated accent color palettes for "Ocean AA". */
  --color-accent-200: #92d1fe;
  --color-accent-600: #0073aa;
  --color-accent-900: #003653;
  --color-accent-950: #00273d;
  /* Generated gray color palettes "Ocean AA". */
  --color-gray-100: #f3f7f9;
  --color-gray-200: #e7eff2;
  --color-gray-300: #bac4c8;
  --color-gray-400: #7b8f96;
  --color-gray-500: #495c62;
  --color-gray-700: #2a3b41;
  --color-gray-800: #182a2f;
  --color-gray-900: #121a1c;
}

@layer base {
  h1 {
    @apply text-2xl;
    @apply mb-2;
    font-weight: 700;
  }

  h2 {
    @apply text-xl;
    @apply mb-2;
    font-weight: 700;
  }

  h3 {
    font-weight: 700;
  }

  body {
    font-family: "Inter", sans-serif;
  }
}

@media (max-width: 640px) {
  .container {
    @apply px-4;
  }
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbars::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbars {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
